﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace GameHubClient.Controls;

public class GameItemButton:Button
{

    static GameItemButton() {
        DefaultStyleKeyProperty.OverrideMetadata(typeof(GameItemButton), new FrameworkPropertyMetadata(typeof(GameItemButton)));
    }

    public static readonly DependencyProperty IconProperty =
               DependencyProperty.Register(nameof(Icon), typeof(ImageSource), typeof(GameItemButton), new PropertyMetadata(null));

    public ImageSource Icon {
        get { return (ImageSource)GetValue(IconProperty); }
        set { SetValue(IconProperty, value); }
    }

    //配置圆角属性
    public static readonly DependencyProperty CornerRadiusProperty =
        DependencyProperty.Register(nameof(CornerRadius), typeof(CornerRadius), typeof(GameItemButton), new PropertyMetadata(new CornerRadius(0)));
    public CornerRadius CornerRadius {
        get { return (CornerRadius)GetValue(CornerRadiusProperty); }
        set { SetValue(CornerRadiusProperty, value); }
    }


}
